<#assign title="表单" />
<#include "/anno.head.ftl" />

<div class="yvan-grid-wrap" data-options="region:'center'">
    <div id="toolbar" class="yvan-toolbar-wrap">
        <div id="YvanSearchBar" class="yvan-search-wrap">
            <div class="easyui-layout">
                <form class="yvan-form" id="SearchForm">

                    <fieldset class="yvan-form-groups">
                        <legend>查询条件</legend>

                        <div class="yvan-row">

                            <input name="cust" id="cust" class="easyui-textbox" type="text"
                                   data-options="label:'客户'"/>
                            <select id="cust_type" name="cust_type" class="easyui-combobox"
                                    data-options="label:'客户类型',valueField:'id', textField:'text'">
                            </select>
                            <select id="st" name="st" class="easyui-combobox"
                                    data-options="label:'审核状态'">
                                <option value="">全部</option>
                                <option value="0">未审核</option>
                                <option value="1">已审核</option>
                                <option value="3">审核未通过</option>
                                <option value="5">已禁用</option>
                            </select>
                            <select id="account_type" name="account_type" class="easyui-combobox"
                                    data-options="valueField:'id', textField:'text',label:'帐户类型'">
                                <option value="">全部</option>
                                <option value="0">总帐户</option>
                                <option value="1">子账户</option>
                            </select>
                            <select id="is_bargaining" name="is_bargaining" class="easyui-combobox"
                                    data-options="label:'直接出库'">
                                <option value="">全部</option>
                                <option value="0">直接出库</option>
                                <option value="1">不直接出库</option>
                            </select>

                            <select id="stamps_type" name="stamps_type" class="easyui-combobox"
                                    data-options="label:'税票类型'">
                                <option value="">全部</option>
                                <option value="NOT">未配置</option>
                                <option value="1">增票</option>
                                <option value="2">普票</option>
                                <option value="3">缓票</option>
                                <option value="4">电普</option>
                            </select>
                            <select id="salepaytype" name="salepaytype" class="easyui-combobox"
                                    data-options="label:'付款方式'">
                                <option value="">全部</option>
                                <option value="NOT">未配置</option>
                                <option value="1">现款</option>
                                <option value="2">款到发货</option>
                                <option value="3">货到收款</option>
                                <option value="4">货款在途</option>
                                <option value="5">协议欠款</option>
                                <option value="6">货款已付</option>
                                <option value="7">电汇</option>
                                <option value="9">销售抵款</option>
                                <option value="10">货到付支</option>
                                <option value="11">货到付电</option>
                                <option value="15">限期欠款</option>
                                <option value="16">临时欠款</option>
                                <option value="17">代收货款</option>
                            </select>
                            <select id="is_sysRegister" name="is_sysRegister" class="easyui-combobox"
                                    data-options="label:'系统开户'">
                                <option value="">全部</option>
                                <option value="1">是</option>
                                <option value="0">否</option>
                            </select>
                            <input name="start_date" id="start_date" class="easyui-datebox"
                                   data-options="label:'创建时间'"/>

                            <input name="end_date" id="end_date" class="easyui-datebox"
                                   data-options="label:'至',validType:'equaldDate[\'#SignedStartDate\']'"/>
                        </div>

                    </fieldset>

                    <div class="yvan-form-actions">
                        <a href="javascript:;" onclick=";" class="easyui-linkbutton button-orange"
                           data-options="plain:true">
                            <i class="yvan-icon fa fa-search"></i> 查询
                        </a>
                        <a href="javascript:;" onclick=";"
                           class="easyui-linkbutton button-line-black l-btn l-btn-small">
                            <i class="yvan-icon fa fa-refresh"></i> 重置
                        </a>
                        <a id="downloadExcel" onclick=";" class="easyui-linkbutton button-line-black l-btn l-btn-small">
                            <i class="yvan-icon fa fa-cloud-download"></i> 导出Excel
                        </a>
                        <a id="uploadCustInfo" class="easyui-linkbutton button-line-black l-btn l-btn-small">
                            <i class="yvan-icon fa fa-cloud-upload"></i> 批量配置出库状态
                        </a>
                    </div>
                </form>
            </div>
        </div>

        <div class="yvan-form-toolbar">
            <a id="add" href='javascript:void(0)' style=""
               class="easyui-linkbutton button-green l-btn l-btn-small l-btn-plain">
                <i class="fa fa-plus-circle fa-lg"></i> 添加
            </a>
            <a id="delete" href='javascript:void(0)' class="easyui-linkbutton button-red l-btn l-btn-small l-btn-plain">
                <i class="fa fa-times fa-lg"></i> 删除
            </a>
            <a href="javascript:;" class="easyui-linkbutton yvan-more-search yvan-z-open" plain="true"
               onclick="toggleSearchPanel(this);">
                收起 <i class="yvan-icon fa fa-angle-double-down"></i>
            </a>
        </div>
    </div>
    <table id="thetable"></table>
</div>

<#include "/anno.foot.ftl" />
<script>
    $(document).ready(function () {
        $('#thetable').datagrid({
            url: '/common/idRuleData.json',
            toolbar: '#toolbar',
            idField: 'idName',
            columns: [[
                {field: 'idName', title: 'Id名称', width: 120},
                {field: 'idDesc', title: '描述', width: 130},
                {field: 'idType', title: '类型', width: 80},
                {field: 'seqType', title: '序列方法', width: 100},
                {field: 'idExpress', title: '表达式', width: 240}
            ]],
        });
    });
</script>